<?php
require_once '../include/common.inc.php';
if($cfg['config']['loginguest']=='0') {
	//header('location:../logging.php');
	//echo '<script>openWin(2,false,"minilogin.php",390,310)</script>';
}
require_once PPCHAT_ROOT.'./include/json.php';
$json=new JSON_obj;
//游客登录
if(!isset($_SESSION['login_uid']) and $cfg['config']['loginguest']=="1"){gusetLogin();}
//房间状态
if($cfg['config']['state']=='2' and $_SESSION['room_'.$cfg['config']['id']]!=true){header("location:login.php?1");exit();}
if($cfg['config']['state']=='0'){exit("<script>location.href='error.php?msg=系统处于关闭状态！请稍候……'</script>");exit();}
//是否登录
//if(!isset($_SESSION['login_uid'])){
if(!$_SESSION['login_uid']){
	//header("location:../logging.php");exit();
//	echo '<script>openWin(2,false,"minilogin.php",390,310)</script>';

}

//用户信息
$uid=$_SESSION['login_uid'];
$db->query("update {$tablepre}members set regip='$onlineip' where uid='{$uid}'");
$userinfo=$db->fetch_row($db->query("select m.*,ms.* from {$tablepre}members m,{$tablepre}memberfields ms  where m.uid=ms.uid and m.uid='{$uid}'")); 
$_SESSION['login_gid']=$userinfo['gid'];
//游客
if($_SESSION['login_uid']==0){$userinfo['username']=$userinfo['nickname']=$_SESSION['login_nick'];$userinfo['sex']=$_SESSION['login_sex'];$userinfo['uid']=$_SESSION['login_guest_uid'];}

//黑名单
$query=$db->query("select * from {$tablepre}ban where (username='{$userinfo[username]}' or ip='{$onlineip}') and losttime>".gdate()." limit 1");
while($row=$db->fetch_row($query)){
	exit("<script>location.href='error.php?msg=用户名或IP受限！过期时间".date("Y-m-d H:i:s",$row['losttime'])."'</script>");exit();
}

//用户组
$query=$db->query("select * from {$tablepre}auth_group order by ov desc");
while($row=$db->fetch_row($query)){
	$groupli.="<div id='group_{$row[id]}'></div>";
	$grouparr.="grouparr['{$row[id]}']=".json_encode($row).";\n";
	$group["m".$row[id]]=$row;
}
//聊天历史记录
$query=$db->query("select * from {$tablepre}msgs where rid='".$cfg['config']['id']."' and p='false' and state!='1' and `type`='0' order by id desc limit 0,20 ");



while($row=$db->fetch_row($query)){
	$row['msg']=str_replace(array('&amp;', '','&quot;', '&lt;', '&gt;'), array('&', "\'",'"', '<', '>'),$row['msg']);
	if($row[tuid]!="ALL"){
		$omsg="<div style='clear:both;'></div><div class='msg'  id='{$row[msgid]}'><div class='msg_head'><img src='../face/img.php?t=p1&u={$row[uid]}'></div><div class='msg_content'><div><font class='u'  onclick='ToUser.set(\"{$row[uid]}\",\"{$row[uname]}\")'>{$row[uname]}</font> <img src='".$group["m".$row[ugid]][ico]."' class='msg_group_ico' title='".$group["m".$row[ugid]][title]."-".$group["m".$row[ugid]][sn]."'>   <font class='dui'>对</font> <font class='u' onclick='ToUser.set(\"{$row[tuid]}\",\"{$row[tname]}\")'>{$row[tname]}</font> 说 <font class='date'>".date('H:i:s',$row[mtime])."</font></div><div class='layim_chatsay' style='margin:5px 0px;'><font  style='{$row[style]};'>{$row[msg]}</font><em class='layim_zero'></em></div></div></div><div style='clear:both;'></div>".$omsg;
	}
	else{
		$omsg="<div style='clear:both;'></div><div class='msg' id='{$row[msgid]}'><div class='msg_head'><img src='../face/img.php?t=p1&u={$row[uid]}'></div><div class='msg_content'><div><font class='u'  onclick='ToUser.set(\"{$row[uid]}\",\"{$row[uname]}\")'>{$row[uname]}</font> <img src='".$group["m".$row[ugid]][ico]."' class='msg_group_ico' title='".$group["m".$row[ugid]][title]."-".$group["m".$row[ugid]][sn]."'> <font class='date'>".date('H:i:s',$row[mtime])."</font></div><div class='layim_chatsay' style='margin:5px 0px;'><font  style='{$row[style]};'>{$row[msg]}</font><em class='layim_zero'></em></div></div></div><div style='clear:both;'></div>".$omsg;
	}
}
//其他处理
$ts=explode(':',$cfg['config']['tserver']);
if(!isset($_SESSION['room_'.$uid.'_'.$cfg['config'][id]])){
	$db->query("insert into  {$tablepre}msgs(rid,ugid,uid,uname,tuid,tname,mtime,ip,msg,`type`)values('{$cfg[config][id]}','{$userinfo[gid]}','{$userinfo[ui/d]}','{$userinfo[username]}','{$cfg[config][defvideo]}','{$cfg[config][defvideonick]}','".gdate()."','{$onlineip}','登陆直播间','3')");
	//$db->query("update {$tablepre}memberfields set logins=logins+1 where uid='{$uid}'");	
	$_SESSION['room_'.$uid.'_'.$cfg['config'][id]]=1;
}	
?>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta name="renderer" content="webkit">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" />
<title>
<?=$cfg['config']['title']?>
</title>
<meta content="<?=$cfg['config']['keys']?>" name="keywords">
<meta content="<?=$cfg['config']['dc']?>" name="description">
<meta property="qc:admins" content="310104337127367555100637572775" />
<meta name="360-site-verification" content="e9f57ba7ed296be93ddcb05e3a1eabab" />
<link rel="shortcut icon" type="image/x-icon" href="<?=$cfg['config']['ico']?>" />
<link href="skins/qqxiaoyou/css.css" rel="stylesheet" type="text/css"  />
<link href="images/layim.css" rel="stylesheet" type="text/css"  />
<script src="script/jquery.min.js"></script>
<script src="script/jquery.cookie.js"></script>
<script src="script/json3.min.js"></script>
<script src="script/socket.io.js"></script>
<!--<script src="script/WebSocket.js"></script>-->
<script src="script/layer.js"></script>
<script src="script/jquery.nicescroll.min.js"></script>
<script src="script/pastepicture.js"></script>
<script src="script/jquery.SuperSlide.2.1.1.js"></script>
<script src="script/swfobject.js" type="text/javascript" charset="utf-8"></script>
<script src="script/function.js?<?=time()?>" type="text/javascript" charset="utf-8"></script>
<!--<script src="script/function.js" type="text/javascript" charset="utf-8"></script>-->
<script src="script/unslider.min.js"></script>
<!--<script src="script/init.js" type="text/javascript" charset="utf-8"></script>-->
<script src="script/init.js?<?=time()?>" type="text/javascript" charset="utf-8"></script>
<script src="script/device.min.js"></script>

<script>
$(function(){
//    if( <?//=$_SESSION['login_uid']?>//&&<?php //echo (isset($_SESSION['login_gid'])&&in_array($_SESSION['login_gid'],$allow_tzck))?1:0   ;?>// ){ $('.div03 .pic').hide(); $('#div03_list').show(); }
    if( 1){ $('.div03 .pic').hide(); $('#div03_list').show();}

    <?php
        $sql ="select * from chat_schedule   order by id desc LIMIT 1";
        $query=$db->query($sql);
        while($row=$db->fetch_row($query)){
          $ico = $row['ico'];
          $start_time = $row['start_time'];
          $end_time = $row['end_time'];
        }
        $now =  time() ;
        $is_hide = ($start_time<$now)&&($end_time>$now)? 0:1;
    ?>

    var html = '<div now="<?=$now?>" start_time="<?=$start_time?>" end_time="<?=$end_time?>" class="line_ad"><a href=""><img src="<?=$ico?>" alt="" /></a><ul class="ad_pic"><li><a href=""><img src="" alt="" /></a></li></ul></div>';
    $('#OnLine_MV').append(html);

    setInterval('setBlackSate()',60000);

    //定时刷新图片状态
   if(<?=$is_hide;?>) { $('.line_ad').hide(); }

})
if (device.mobile()){window.location = '/room/m';}
globalgid = <?=$cfg['config']['id']?>;
des_msg = <?=$cfg['config']['des_msg']?>;
is_login = <?=$_SESSION['login_uid']?>;

var UserList;
var ToUser;
var VideoLoaded=false;
var My={dm:'<?=$_SERVER['HTTP_HOST']?>',rid:'<?=$cfg['config']['id']?>',roomid:'<?=$_SERVER['HTTP_HOST']?>/<?=$cfg['config']['id']?>',chatid:'<?=$userinfo['uid']?>',name:'<?=$userinfo['username']?>',nick:'<?=$userinfo['nickname']?>',sex:'<?=$userinfo['sex']?>',age:'0',qx:'<?=check_auth('room_admin')?'1':'0'?>',ip:'<?=$onlineip?>',vip:'<?=$userinfo['gid']?>',color:'<?=$userinfo['gid']?>',cam:'0',state:'0',mood:'<?=$userinfo['mood']?>',rst:'<?=time()?>',camState:'1',key:'<?=connectkey()?>'}

var RoomInfo={loginTip:'<?=$cfg['config']['logintip']?>',Msglog:'<?=$cfg['config']['msglog']?>',msgBlock:'<?=$cfg['config']['msgblock']?>',msgAudit:'<?=$cfg['config']['msgaudit']?>',defaultTitle:document.title,MaxVideo:'10',VServer:'<?=$cfg['config']['vserver']?>',VideoQ:'',TServer:'<?=$ts[0]?>',TSPort:'<?=$ts[1]?>',PVideo:'<?=$cfg['config']['defvideo']?>',AutoPublicVideo:'0',AutoSelfVideo:'0',type:'1',PVideoNick:'<?=$cfg['config']['defvide0nick']?>',OtherVideoAutoPlayer:'<?=$cfg['config']['livetype']?>',r:'<?=$cfg['config']['rebots']?>'}
var grouparr=new Array();
<?=$grouparr?>
var ReLoad;
var isIE=document.all;
var aSex=['<span class="sex-womon"></span>','<span class="sex-man"></span>',''];
var aColor=['#FFF','#FFF','#FFF'];
var msg_unallowable="<?=$cfg['config']['msgban']?>";
var bg_img = "<?=$cfg['config']['bg']?>";
</script>
<?php
//禁言
$query=$db->query("select * from {$tablepre}send where (username='{$userinfo[username]}' or ip='{$onlineip}') limit 1");
while($row=$db->fetch_row($query)){
	echo "<script>remove_auth('msg_send');</script>";
}
?>
<style>
	.logo_bg{display: inline-flex;}
	.logo_bg .kefu{height: 17px; margin-top: 15px;}
	.logo_bg .headerban{color: #eee; padding: 3px 7px 5px 12px; font-size: 14px;}
	.logo_bg .headerban:hover{color: #ff0;}
</style>
</head>
<body onresize="OnResize()" onUnload="OnUnload()" style='background: url("skins/bg/w3.jpg") 0px 0px / 100% 100% no-repeat scroll rgb(64, 128, 128); position: relative;'>
<script>
	if($.cookie('bg_img') != '' && $.cookie('bg_img') != undefined) {
		$('body').attr('style', 'background: #408080 url(' + $.cookie('bg_img') + ') no-repeat scroll 0 0/100% 100%');
	} else {
		$('body').attr('style', 'background: #408080 url(' + bg_img + ') no-repeat scroll 0 0/100% 100%');
	}    
</script>

<div class="bdisc-box">
    <i class='isc_colse'></i>
    <div class="gp_top">
        <p class="p01">股票名称(代码)：<span class='id-code'>1234(123456)</span></p>   
        <p class="p02">推荐时间：<span>12-09  14：05</span></p>
    </div>
    <div class="gp_cause">
        <span>推荐理由：</span>公司主业稳健，受益于行业集中度提升公司拥有奥康、康龙、斯凯奇等品牌，未来将引进更多时尚、运动类品牌。渠道方面持续优化，直营、集合店比例持续提升。公司作为男鞋行业龙头公司，品牌资源丰富、直营占比高、单店销售高，将充分受益于行业集中度提升。该股今天日强势涨停，后市有望进一步走强。
    </div>
    <div class="qq_content">
        <h3>会员查看请登录，非会员请联系下方老师助理领取登录密码</h3>
        <ul class="qq_list">
            <li>
                <a href="">
                    <img src="images/qq_list.png" alt="" />
                </a>
            </li>
            <li>
                <a href="">
                    <img src="images/qq_list.png" alt="" />
                </a>
            </li>
            <li>
                <a href="">
                    <img src="images/qq_list.png" alt="" />
                </a>
            </li>
            <li>
                <a href="">
                    <img src="images/qq_list.png" alt="" />
                </a>
            </li>
            <li>
                <a href="">
                    <img src="images/qq_list.png" alt="" />
                </a>
            </li>
        </ul>
    </div>
</div>

<div id="UI_MainBox" >
<script>if (!device.desktop()){window.location = './m';}</script>
  <div id="UI_Head">
    <div class="head">
      <div id="head_box" class="head_box">
        <div class="txtMarquee-left" style="width:608px;padding-left: 550px;height40px;line-height: 40px;float: left;">
          <div class="bd">
            <ul class="infoList" style="overflow: hidden;">
              <li>你注册，我就送！现注册报名，马上赠金股一只，价值百万机器人炒股利器免费体验！</li>
              <li class="dome" style='visibility: hidden;'>你注册，我就送！现注册报名，马上赠金股一只，价值百万机器人炒股利器免费体验！</li>
            </ul>
          </div>
        </div>
        <script type="text/javascript">
        jQuery(".txtMarquee-left").slide({mainCell:".bd ul",autoPlay:true,effect:"leftMarquee",vis:1,interTime:20});
        </script>
        <!-- <p class="hb-register">你注册，我就送！现注册报名，马上赠金股一只，价值百万机器人炒股利器免费体验！</p> -->
        <div class="logo_bg">
            <div class="lb_l" style="BACKGROUND: url(<?=$cfg['config']['logo']?>) no-repeat"></div>
			<a href="ico.php" target="_blank" class="zmurl"><img src="skins/qqxiaoyou/bc.png" alt="" /></a>
        <a href="<?=$wpbaseurl.'/func/public/?token='.$uid=$_SESSION['access_token'];?>"  class="zmurl zwid"><img src="images/btn-01.png" alt="" /></a>
        <span class="bdisc" id="bdisc">
            <img src="images/niu.png" alt="" />
        </span>
		</div>
		<div class="huanfu"><a onclick="showBgList();" id="huanfugn">换肤</a></div>
        <div class="head_user">
          <?php
            if($_SESSION['login_uid']>0)
			{
			?>
          <a href="javascript:void(0)" class="userinfo" onClick="openWin(2,false,'profiles.php?uid=<?=$userinfo['uid']?>',460,600)"><img src='../face/img.php?t=p1&u=<?=$userinfo['uid']?>' border="0" class="userimg"/>
          <?=$userinfo['username']?>
          ▼</a> <a href='../logging.php?act=logout' class="userlogout">退出</a>
          <?php
			}else{
			?>
<!--        <a href="../include/wechat_login.php" class="Wechat_logo"><img src='skins/qqxiaoyou/Wechat_logo.png'></a>-->
<!--			  <a href="../include/Connect2.1/oauth/index.php" class="qqlogin"><img src='skins/qqxiaoyou/Connect_logo_7.png'></a>-->
              <a href="javascript:void(0)" class="login" onClick="openWin(2,false,'minilogin.php',390,310)">登录</a>
			  <a href="javascript:void(0)" class="reg" onClick="openWin(2,false,'minilogin.php?a=0',390,533)">注册</a>
          <?php }?>
        </div>
      </div>
    </div>
  </div>
  <div id="UI_Left">
    <div id="UI_Left1" class="bg_png1">
<!--       <?php
    $query=$db->query("select * from {$tablepre}apps_manage where s='0' order by ov desc ");
	while($row=$db->fetch_row($query)){
		
		$obj=$json->encode($row);
		echo "
		<a href='javascript://' class='appico' onClick='openApp({$obj})' id='app_$row[id]'>
		<img src='$row[ico]' /><br>
		<span>{$row[title]}</span>
		</a>
		";
	}
	?> -->
    </div>
    <div id="UI_Left2"  class="bg_png1">
    <!-- 原油、白银、铜的数据 注释备用 -->
	  <!-- <div class="bg_png1">
        <iframe height="71" width="100%" allowTransparency="true" marginwidth="0" marginheight="0"  frameborder="0" scrolling="no" src="../apps/vote.php?rid=<?=$cfg['config']['id']?>"></iframe>
      </div> -->
    <!-- 微信二维码扫一扫 注释备用 -->
      <!-- <div style="height:85px; background:#fff"><img src="<?=$cfg['config']['ewm']?>" width=190></div> -->
    
    <!-- LKS2016/11/3 -->
      <div clas='rs-warn' style="text-align: center;">
          <img src="skins/qqxiaoyou/warn.png" alt="" />
      </div>
      <!-- 二维码 -->
      <div class="re-Code">
          <p class="sc"><lable><img src="skins/qqxiaoyou/re-ewm.png" alt="" /></lable>扫码下载APP  牛股早知道</p>
          <div class="Code-pic clearfix">
              <div class="cp-l">
                 <img src="skins/qqxiaoyou/azb.jpg" alt="" />
                 <p><img src="skins/qqxiaoyou/a-icon.png" alt="" />安卓版</p>
              </div>
              <div class="cp-r">
                 <img src="skins/qqxiaoyou/iosb.jpg" alt="" />
                 <p><img src="skins/qqxiaoyou/i-icon.png" alt="" />苹果版</p>
              </div>
          </div>
      </div>
      <!-- 手机扫二维码 -->
      <!-- <div class="zb-code clearfix">
          <div class='zc-l'>
              <img src="skins/qqxiaoyou/zc-code.png" alt="" />
          </div>
          <div class='zc-r'>
              <p>扫一扫</p>
              <p>手机看直播</p>
          </div>
      </div> -->

      <div  class="title_tab">
          <a href="javascript:void(0)" class="bg_png2" onClick="bt_SwitchListTab('User')" id="listTab1">在线会员 <span id="onlineWrap" style="display: none">(<span style="" id="OnlineUserNum"></span>)</span></a>
          <!-- 我的客服切换 注释备用-->
           <a style="display: none;" href="javascript:void(0)" onClick="bt_SwitchListTab('Other')" id="listTab2">我的客服(<span id="OnlineOtherNum"></span>)</a>
      </div>
      <div style="clear:both"></div>
        
        <!-- 会员搜索 注释备用 -->
      <div id="OnlineUser_Find" style="display:none;height:25px; margin:0px; padding:2px; overflow:hidden; line-height:25px; border:1px solid #999" class="bg_png2">
        <input name="" type="image" title="找人" onClick="bt_FindUser()" src="images/search.png" style="float:right; margin:5px;" />
        <input name="finduser" type="text" id="finduser"  style="border:0px; width:150px; height:25px; line-height:25px; padding:0px; background:none; color:#FFF; "/>
      </div>

      <div id="OnLineUser_OhterList" class="OnLineUser" style="height:50px;display:none" >
        <div id="group_myuser"></div>
      </div>
      <div id="OnLineUser_FindList" class="OnLineUser" style="height:50px;display:none" ></div>
      <div id="OnLineUser" class="OnLineUser bg_png"  style="height:50px;width: 100%;">
        <div id="group_my"></div>
        <?=$groupli?>
        <div id="group_rebots"></div>
      </div>
	  <div class="notice"></div>
    </div>
    
  </div>
  <div id="UI_Central"  class="bg_png">
    <!-- <div class="title_bar">
    聊天框头部滚动轮播 
    <marquee scrollamount="3" id="msg_tip_show">
    	<?php
        $query=$db->query("select * from {$tablepre}msgs where  rid='".$cfg['config']['id']."' and state='2' and type='0' order by id desc limit 1");
		while($row=$db->fetch_row($query)){
			echo "<span style='color:#FF0'>".tohtml($row[msg])."</span>";
		}
		?>
    </marquee> 
    </div>  -->
    <div id="MsgBox" style="position:relative;">
	<a href="javascript:void(0)" class="bar_4 bar" id="bt_qingping" style="position: absolute; top: 5px; right: 5px; border: 0; background-color: #CCC; z-index: 1000;" onClick="bt_MsgClear();">清屏</a>
	<a href="javascript:void(0)" class="bar_5 bar" id="bt_gundong" style="position: absolute; top: 5px; right: 65px; border: 0; background-color: #CCC; z-index: 1000;" select="true"  onClick="bt_toggleScroll()" >滚动</a>
      <div id="Video_List"></div>
      <div id="MsgBox1" style="overflow:auto; height:50px; padding:10px 5px 10px 5px;position:relative; word-break: break-all; word-wrap: break-word;" >		
        <?=$omsg?>
      </div>
      <div class="drag_skin" id="drag_bar" style=" display:none"></div>
      <div id="MsgBox2" style="height:100px; overflow:auto;  padding:0px 10px 0px 10px;position:relative; display:none" ></div>
    </div>
    <div id="UI_Control" class="tool_bar" >
		<div id="FontBar" style="display:none">
		  <select name="FontName" id="FontName" onChange="getId('Msg').style.fontFamily=this[this.selectedIndex].value">
			<option selected="selected">字体</option>
			<option value="SimSun" style="font-family: SimSun">宋体</option>
			<option value="SimHei" style="font-family: SimHei">黑体</option>
			<option value="KaiTi_GB2312" style="font-family: KaiTi_GB2312">楷体</option>
			<option value="FangSong_GB23122" style="font-family:FangSong_GB2312">仿宋</option>
			<option value="Microsoft YaHei" style="font-family: Microsoft YaHei">微软雅黑</option>
			<option value="Arial">Arial</option>
			<option value="MS Sans Serif">MS Sans Serif</option>
			<option value="Wingdings">Wingdings</option>
		  </select>
		  <select name="FontSize"  id="FontSize" onChange="getId('Msg').style.fontSize=this[this.selectedIndex].value+'pt'">
			<option value="8">8</option>
			<option value="9">9</option>
			<option value="10">10</option>
			<option value="11">11</option>
			<option value="12"  selected="selected">12</option>
			<option value="13">13</option>
			<option value="14">14</option>
		  </select>
		  <input type="image" class="bt_false" title="粗体" onMouseOver="this.className='bt_true'" onMouseOut="if(this.value=='false')this.className='bt_false'" src="images/bold.gif" onClick="ck_Font(this,'FontBold')" value="false"/>
		  <input type="image" class="bt_false" title="斜体" onMouseOver="this.className='bt_true'" onMouseOut="if(this.value=='false')this.className='bt_false'" src="images/Italic.gif" onClick="ck_Font(this,'FontItalic')" value="false"/>
		  <input type="image" class="bt_false" title="下划线" onMouseOver="this.className='bt_true'" onMouseOut="if(this.value=='false')this.className='bt_false'" src="images/underline.gif" onClick="ck_Font(this,'Fontunderline')" value="false"/>
		  <input name="FontColor" type="image" class="bt_false" id="FontColor" title="文字颜色" onMouseOver="this.className='bt_true'" onMouseOut="this.className='bt_false'" src="images/color.gif" onClick="ck_Font(this,'ShowColorPicker');" value="false"/>
		</div>
        <!-- 新增点击速发点赞或其他 -->
        <div class="biaoqing_box">
            <ul class="clearfix">
                <li>
                    <a href="javascript: void(0);" onclick="sendFace(1)">
                        <img src="skins/qqxiaoyou/flower_icon.png" alt="" />
                    </a>
                </li>
                <li>
                    <a href="javascript: void(0);" onclick="sendFace(0)">
                        <img src="skins/qqxiaoyou/geili_icon.png" alt="" />
                    </a>
                </li>
                <li>
                    <a href="javascript: void(0);" onclick="sendFace(2)">
                        <img src="skins/qqxiaoyou/guzhang_icon.png" alt="" />
                    </a>
                </li>
                <li>
                    <a href="javascript: void(0);" onclick="sendFace(3)">
                        <img src="skins/qqxiaoyou/ding_icon.png" alt="" />
                    </a>
                </li>
                <li>
                    <a href="javascript: void(0);" onclick="sendFace(4)">
                        <img src="skins/qqxiaoyou/zan_icon.png" alt="" />
                    </a>
                </li>
            </ul>
        </div>
    <!-- 聊天窗口上面的轮播 以备用 -->
    <!-- <div style="background:#FFF; height:30px; line-height:30px; overflow: hidden; font-size:14px;">
		<marquee scrollamount="3" id="msg_tip_admin_show">
		<?php
			$query=$db->query("select * from {$tablepre}msgs where  rid='".$cfg['config']['id']."' and state='3' and type='0' order by id desc limit 1");
			while($row=$db->fetch_row($query)){
				echo "<span style='color:red'>".tohtml($row[msg])."</span>";
			}
		?>
		</marquee>
    </div> -->
	<div id="qqbts" >
<!--		<span>在线客服：</span>-->
<!--		<a class="morekf" href="javascript: void(0)"  onclick="openWin(2,'客服列表','/apps/kefu.php',810,500)">更多客服</a>-->
<!--		<a class="morekf" href="javascript: void(0)"  onclick="showBgList1()">更多客服</a>-->
        <div class="qqbts" id="qqbts">


        </div>
	</div>
    <select id="ToUser">
          <option value="ALL">大家</option>
    </select>     
    <span >
        
        <a href="javascript:void(0)" class="bar_7 bar" id="bt_myimage" onClick="bt_FontBar(this)" >字体</a>
		<a href="javascript:void(0)" id="bt_face" class="bar_2 bar" onclick="showFacePanel(this,'#Msg');" isface="2">表情</a>
		<a href="javascript:void(0)" class="bar_3 bar" id="bt_caitiao">彩条</a>

		<a href="javascript:void(0)" style="display: none;"  class="bar_1 bar chat_img" id="bt_myimage" onclick="bt_insertImg('#Msg')">图片</a>
		<!--<a href="javascript:void(0)" class="bar_4 bar" id="bt_qingping" onClick="bt_MsgClear();">清屏</a>
		<a href="javascript:void(0)" class="bar_5 bar" id="bt_gundong" select="true"  onClick="bt_toggleScroll()" >滚动</a>-->
	</span>

        <input  type="hidden" name="Personal" id="Personal" value="false" />
<!--       <input name="BTFont" type="image" id="BTFont" title="设置字体颜色和格式" onClick="bt_FontBar(this)" src="images/Font.gif"/>-->

    </div>
    <div style="position:relative; height:90px; overflow:hidden; padding-top:1px; background:#FFF">
      <div id="Msg" contentEditable="true" style="height:80px; overflow:auto; margin:5px;font-size:12pt; color:#000; padding-right:130px; line-height:40px;" onClick="HideMenu();"></div>
      <div style="text-align:right;top:-45px; left:100%;position:relative; margin-left:-115px; width:70px;">
        <input name="Send_bt" type="image" src="images/send.png" id="Send_bt" title="发送消息" />
        <input type="hidden" name="Send_key" id="Send_key" value="1" />

      </div>
    </div>
    <div id="manage_div" style="background: #E1E1E1; margin:0px; color:#333; height:25px; line-height:23px; display:none; padding-left:5px;">
		<select id="chat_type" style="display:none">
			<option value="me" selected>发言人-自己</option>
			<option value="he" title="当前聊天">发言人-他人</option>
		</select>
		<label><input type="checkbox" id="msg_tip">置顶公告</label>
		<label><input type="checkbox" id="msg_tip_admin">管理提示</label>
		<label><input type="checkbox" id="msg_tip_marquee">跑马灯</label>
    </div>
</div>
  <div id="UI_Right" class="bg_png">
    <div id="RoomMV">
      <div class="title_bar rm-xs">
		<span id="defvideosrc">当前讲师：<i><?=$cfg['config']['defvideonick']?></i></span> 
		<span id="bt_defvideosrc" style="display: none;"> [<a href='javascript:bt_defvideosrc()'>上课</a>]</span>
        <span id="rm-zan" style='margin-right:20px'><img style="vertical-align: sub;margin-right: 5px;" src="skins/qqxiaoyou/zan.png" alt="" /><b style="font-weight: normal;">16854894</b></span>
    <span id='kecheng'>
       <?php
  //   $query=$db->query("select * from {$tablepre}apps_manage where s='0' order by ov desc ");
  // while($row=$db->fetch_row($query)){
    
  //   $obj=$json->encode($row);
  //   echo "
  //   <a href='javascript://' class='appico' onClick='openApp({$obj})' id='app_$row[id]'>
  //   <span>{$row[title]}</span>
  //   </a>
  //   ";
  // }
  ?>

  <a href='javascript: void(0);' class='appico'>
     <span>课程管理</span>
   </a>
    </span>
        <div class="rm-Refresh" style="float:right;">
<!--            <span id="rm-state">重播中</span>-->
            <span id="Div_VN1"></span> <a href='javascript:showLive()'><img style="vertical-align: sub;margin-right: 5px;" src="skins/qqxiaoyou/rm-state.png" alt="" />刷新视频</a>
        </div>
		<!--<span id="Div_VN1"><a href='javascript:showLive()'><img src="skins/qqxiaoyou/f5.png"></a></span> -->
        <!-- 为老师点赞 -->
		<!-- <a href="javascript://" onClick="openWin(2,'讲师榜','/apps/rank.php',820,600)" style="float:right; color:#FF0"><img src="skins/qqxiaoyou/teacherBtn.png" style="height: 22px; margin-top: 3px;"></a> -->
        </div>
      <div id="OnLine_MV">
      <span style="font-size:18px">您还没有安装flash播放器,请点击<a href="http://www.adobe.com/go/getflash" target="_blank"  style="font-size:18px;color:#090">这里</a>安装</span>
        
      </div>
    </div>
    <div class="bg_png2 NoticeList">
    <?php
    $query=$db->query("select * from {$tablepre}notice where type='notice' order by ov desc,id desc");
	while($row=$db->fetch_row($query)){
		$tab.="<a href='javascript:void(0)' id='notice_{$row[id]}' class='notice_tab'>{$row[title]}</a>";
		if($row[title] == '图片公告') {
			$txt.="<div id='notice_{$row[id]}_div' class='notice_div' style='display:none'>";
			$txt.='<div style="height:250px; width:100%; overflow:hidden; position:relative;" id="gd_ad">';
			$txt.='<span class="prev"></span>';
			$txt.='<span class="next"></span>';
			$txt.=tohtml($row['txt']);
			$txt.='</div></div>';
		} else {
			$txt.="<div id='notice_{$row[id]}_div' class='notice_div' style='display:none'>".tohtml($row['txt'])."</div>";
		}
	}
	while($row=$db->fetch_row($query)){
		$pic_ad_c="<div id='notice_{$row[id]}_div' class='notice_div' style='display:none'>".tohtml($row['txt'])."</div>";
		$pic_ad_t="<a href='javascript:void(0)' id='notice_{$row[id]}' class='notice_tab'>{$row[title]}</a>";
	}
	?>
        $query=$db->query("select * from {$tablepre}notice where id='1'");

        <!-- 导航 -->
        <div class="tab bg_png1">
          <!--  <?=$pic_ad_t?>
          <?=$tab?> -->
          
          <div style=" clear:both"></div>
        </div>
      <div id="NoticeList">
        <!--  <?=$pic_ad_c?>
        <?=$txt?>  -->
        <div class="slideTxtBox">
            <div class="hd bg_png1">

                <!-- 下面是前/后按钮代码，如果不需要删除即可 -->
                <span class="arrow"><a class="next"></a><a class="prev"></a></span>

                <ul><li>活动</li><li>名师简介</li><li>特供参考</li><li>版权声明</li></ul>
            </div>
            <div class="bd">
                <div class="div01">
                    <div class="banner" id="banner">
                        <ul class="clearfix">

<!--                            <li>-->
<!--                                <a href="javascript: void(0);"><img src="skins/qqxiaoyou/900X222.jpg" alt="" /></a>-->
<!--                            </li>-->
                        </ul>
                        <a href="javascript:void(0);" id="b-prev">
                            <img src="skins/qqxiaoyou/3362.png" alt="" />
                        </a>
                        <a href="javascript:void(0);" id="b-next">
                            <img src="skins/qqxiaoyou/3361.png" alt="" />
                        </a>
                    </div>
                </div>
                <div class="div02" style="height:100%;overflow-y: auto;">

                    <?php
                    $query=$db->query("select * from {$tablepre}lecturer where  roomid='".$cfg['config']['id']."' and is_show='1'  order by ord asc ");
                    while($row=$db->fetch_row($query)){
                        $row[remark] = strip_tags($row[remark], '<br>');
                        ?>

                    <div class="js-message clearfix">
                        <div class="jm-l">
                            <img src="<?=$row[ico]?>" alt="" />
                        </div>
                        <div class="jm-r">
                            <p class="name" style="font-size: 16px;color: #eaa62a;margin-bottom: 15px;"><?=$row[name]?></p>
                            <p><span class='rq'><img src="skins/qqxiaoyou/rq_03.png" alt="" /><b style="font-size: 14px;font-weight: normal;"><?=$row[roomview]?></b></span><span class='bf'><img src="skins/qqxiaoyou/rq_06.png" alt="" /><b style="font-weight: normal;font-size: 14px;"><?=$row[videonum]?></b></span></p>
                        </div>
                    </div>
                    <div class="js-introduce">
<!--                         <p>某知名证券咨询公司十多年首席投顾分析师，私募基金投资经理，某慈善基金会特聘投资顾问，著名财经学校特聘讲师。操盘手起家，实战派人士，对资金的趋势性和搏弈带来的机会有敏锐的感觉，善于掌握交易性投资机会。</p>-->
<!--<p>历经Ａ股多轮的牛熊转换，形成了其独特的操盘秘籍《猎庄黄金战法》《仓位九段法》等，并多次在权威财经媒体或公开报告会发表！</p>-->
                        <?=$row[remark]?>


                    </div>
                    <hr />
            <?php  }  ?>
<!--                    <div class="js-message clearfix">-->
<!--                        <div class="jm-l">-->
<!--                            <img src="skins/qqxiaoyou/hqb.png" alt="" />-->
<!--                        </div>-->
<!--                        <div class="jm-r">-->
<!--                            <p class="name" style="font-size: 16px;color: #eaa62a;margin-bottom: 15px;">何庆彬</p>-->
<!--                            <p><span class='rq'><img src="skins/qqxiaoyou/rq_03.png" alt="" /><b style="font-size: 14px;font-weight: normal;">38794</b></span><span class='bf'><img src="skins/qqxiaoyou/rq_06.png" alt="" /><b style="font-weight: normal;font-size: 14px;">11</b></span></p>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                    <div class="js-introduce">-->
<!--                         <p>具有专业扎实的金融基础，拥有证监会的认证资格。多年就职于国内顶级操盘机构。</p>-->
<!--<p>多次受邀主讲光大证券、银河证券等多家知名券商的大客户投资分享会，原创投资分析报告多次被多次被国内券商采纳。擅长技术分析，投资风格激进不失稳健</p>-->
<!--                    </div>-->
<!---->
<!--                    <hr />-->
<!---->
<!--                    <div class="js-message clearfix">-->
<!--                        <div class="jm-l">-->
<!--                            <img src="skins/qqxiaoyou/wyf.png" alt="" />-->
<!--                        </div>-->
<!--                        <div class="jm-r">-->
<!--                            <p class="name" style="font-size: 16px;color: #eaa62a;margin-bottom: 15px;">巫燕峰</p>-->
<!--                            <p><span class='rq'><img src="skins/qqxiaoyou/rq_03.png" alt="" /><b style="font-size: 14px;font-weight: normal;">35675</b></span><span class='bf'><img src="skins/qqxiaoyou/rq_06.png" alt="" /><b style="font-weight: normal;font-size: 14px;">16</b></span></p>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                    <div class="js-introduce">-->
<!--                         <p> 于2007年9月加入某基金管理有限公司,先后担任过策略分析师、债券分析师。</p>-->
<!--<p>潜心研究股票多年，擅长基本面分析，实地调研过多家上市公司，拥有多年实战经验。形成基本面选股，技术面择时的操作风格。敬畏市场，只做有把握的投资，注重控制风险，实现长期稳定盈利。</p>-->
<!--                    </div>-->
<!---->
<!--                    <hr />-->
<!--                    <div class="js-message clearfix">-->
<!--                        <div class="jm-l">-->
<!--                            <img src="skins/qqxiaoyou/csy.png" alt="" />-->
<!--                        </div>-->
<!--                        <div class="jm-r">-->
<!--                            <p class="name" style="font-size: 16px;color: #eaa62a;margin-bottom: 15px;">陈世玉</p>-->
<!--                            <p><span class='rq'><img src="skins/qqxiaoyou/rq_03.png" alt="" /><b style="font-size: 14px;font-weight: normal;">25897</b></span><span class='bf'><img src="skins/qqxiaoyou/rq_06.png" alt="" /><b style="font-weight: normal;font-size: 14px;">9</b></span></p>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                    <div class="js-introduce">-->
<!--                         <p>具有超过11年的股票研究经验。拥有丰富的大资金运作经验，战绩卓著，曾就职于某著名证券公司研发中心。深谙中国股市，在市场和政策深度分析方面视角独特。在机会把握上擅长准确把握市场运行节奏，注重在投资上的提前动作，充分地分享资本市场每个阶段的投资主题带来的机会；善于解析国内政策，及时捕捉市场热点板块龙头股。</p>-->
<!--                    </div>-->
<!---->
<!--                    <hr />-->
<!---->
<!--                    <div class="js-message clearfix">-->
<!--                        <div class="jm-l">-->
<!--                            <img src="skins/qqxiaoyou/hyb.png" alt="" />-->
<!--                        </div>-->
<!--                        <div class="jm-r">-->
<!--                            <p class="name" style="font-size: 16px;color: #eaa62a;margin-bottom: 15px;">王艳兵</p>-->
<!--                            <p><span class='rq'><img src="skins/qqxiaoyou/rq_03.png" alt="" /><b style="font-size: 14px;font-weight: normal;">39685</b></span><span class='bf'><img src="skins/qqxiaoyou/rq_06.png" alt="" /><b style="font-weight: normal;font-size: 14px;">12</b></span></p>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                    <div class="js-introduce">-->
<!--                         <p>  曾经担任私募基金公司首席操盘手，熟悉和从事过股票、期货、期权、外汇、港股、美股等资本市场的投资，全心研究金融市场9年，从事股市实盘操作8年，擅长基本面、技术面、资金面结合分析，操作手法彪悍，操作风格中短结合，拥有自创的分析系统和交易系统加资金管理方法。具有稳、准、狠的操盘特点。</p>-->
<!--                    </div>-->

                </div>
                <div class="div03">
                    <div class="pic">
                        <img id='div03_vip' src="skins/qqxiaoyou/VIP2.gif" alt="" />
                    </div>
                    <div class="list" id="div03_list" style="display: none;">   <!-- 判断状态显示或者隐藏 -->
                        <ul>
<!--                            <li>-->
<!--                                <a href="">-->
<!--                                     1. 征求意见稿发布近两个月后，史上最严网贷信息披露标准正式版终于出炉。-->
<!--                                </a>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <a href="">-->
<!--                                     1. 征求意见稿发布近两个月后，史上最严网贷信息披露标准正式版终于出炉。-->
<!--                                </a>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <a href="">-->
<!--                                     1. 征求意见稿发布近两个月后，史上最严网贷信息披露标准正式版终于出炉。-->
<!--                                </a>-->
<!--                            </li>-->
                        </ul>
                    </div>
                </div>
                <div class="div04">
                    <p>1、国诚现场直击发布的资讯仅供参考，不代表现场直击立场。现场直击对文中的观点判断保持中立，对该信息内容的准确性、可靠性或内容的完整性不提供保证。投资者自行参考，据此操作，风险自担。</p>
<p>2、现场直击分析师发表的言论均代表其个人对于投资市场的观点，问股、互动等行为，仅代表个人观点，不构成任何投资建议，亦不代表现场直击的观点或建议，敬请广大投资者理性对待，谨慎投资！
</p>
                </div>
            </div>
        </div>
        <script type="text/javascript">
          jQuery(".slideTxtBox").slide({trigger:"click",prevCell:false,nextCell:false,autoPlay:false});
        </script>
      </div>
<script>
	$('.tab a:first').addClass('active');
	$('.notice_div:first').css('display','');
	$('.tab a').on('click',function(){
		$('.tab a').removeClass('active');
		$(this).addClass('active');
		$('.notice_div').css('display','none');
		$('#'+$(this)[0].id+'_div').css('display','');
	});
	function SpreadSccroll()
	{
		setTimeout(function(){
		var $myul = $("#gd_ad");
		if($myul.find("a").length < 2)
		{
			return;
		}
		$actli=$myul.find("a:first");
		$actli.fadeToggle(function(){
			$myul.find("a:first").appendTo($myul);
			SpreadSccroll();
		});
		$actli.fadeToggle();
		},5000);
	}
	SpreadSccroll();
	$('#gd_ad .prev').on('click', function() {
		var $myul = $("#gd_ad");
		if($myul.find("a").length < 2)
		{
			return;
		}
		$actli=$myul.find("a:first");
		$actli.fadeToggle(function(){
			$myul.find("a:last").prependTo($myul);
		});
		$actli.fadeToggle();
	});
	$('#gd_ad .next').on('click', function() {
		var $myul = $("#gd_ad");
		if($myul.find("a").length < 2)
		{
			return;
		}
		$actli=$myul.find("a:first");
		$actli.fadeToggle(function(){
			$myul.find("a:first").appendTo($myul);
		});
		$actli.fadeToggle();
	});
</script> 
    </div>
</div></div>
<div id='ColorTable' style="display:none; " onblur="BrdBlur('ColorTable');" tabIndex></div>
<div id="Smileys" style="display:none; height:180px;" onblur="BrdBlur('Smileys');" tabIndex></div>
<div id="Send_key_option" style="display:none" onblur="BrdBlur('Send_key_option');" tabIndex>
  <div onMouseOver="this.className='bt_true'" onMouseOut="this.className='bt_false'" style="padding-left:20px; height:20px; line-height:20px;" class="bt_false" onClick="$('Send_key').value='1';$('Send_key_option').style.display='none'">按 Enter 键发送消息</div>
  <div onMouseOver="this.className='bt_true'" onMouseOut="this.className='bt_false'" style="padding-left:20px; height:20px; line-height:20px;" class="bt_false" onClick="$('Send_key').value='2';$('Send_key_option').style.display='none'">按 Ctrl+Enter 键发送消息</div>
</div>

<div style="position:absolute; left: -100px;" id="MsgSound"></div>
<div id="face" style="position:absolute; display:none"></div>
<div id="caitiao" class="hid ption_a"></div>
<form id="imgUpload" name="imgUpload" action="" method="post" enctype="multipart/form-data" target="e">
<input type="hidden" name="info" id="imgUptag" value="#Msg">
<input id="filedata" contenteditable="false" type="file" style="display:none;" onchange="$('#imgUpload').attr('action','../upload/upload_frame.php?act=InsertImg&' + new Date().getTime() );document.imgUpload.submit();" name="filedata">
</form>
<iframe name="e" id="e" style="display:none"></iframe>
<iframe src="voice.php" id="voice" style="display:none"></iframe>
<div id="tip_login_win" style="display:none">
    <div id="alertad" class="qqbts alertad"  >

    </div>
<?php
//	$query=$db->query("select * from {$tablepre}notice where id='2'");
//	while($row=$db->fetch_row($query)){
//		echo tohtml($row['txt']);
//	}
//?>
<?php
	//echo '<iframe style="display:none;" src="tencent://message/?uin=' . $defqqkf . '&Site=&menu=yes"></iframe>';
?>
</div>

<!-- vip通道弹窗 -->
<div class="popup" id="popup">
    <div class="dark"></div>
    <div class="tc-box">
        <i class="tc-close"></i>
        <iframe id="tc_dan" src="http://actapi.gdgccj.com/html/soft/zhibopup/" frameborder="0" width="620" height="400"></iframe>
    </div>
</div>



<!-- 判断是否登录弹窗 -->
<div class="login_tip">
  <div class="lt_content">
      <h3>温馨提醒</h3>
      <p>您现在没有权限发表言论，请先登录账号或注册</p>
  </div>
  <div class="lt_btn">
      <button class="lg_lt_btn">确定</button>
  </div>
  <!-- <div class="lt_colse">
    x
  </div> -->
</div>

<!-- 课程表弹窗 -->
<?php
$str = '';
$ctime = '';
$sql ="select *, DAYOFWEEK(ctime) as week from chat_course  where ctime = CURDATE() LIMIT 1 ";
$query=$db->query($sql);
while($row=$db->fetch_row($query)){
    $str =  '<img style="width:550px"  src="'.$row['ico'].'" alt="" />';
    $ctime = $row['ctime'].' '.date_week($row['week']);
}

if(!$str){
    $sql ="select *, DAYOFWEEK(ctime) as week from {$tablepre}course  order by id desc LIMIT 1 ";
    $query=$db->query($sql);
    while($row=$db->fetch_row($query)){
        $str =  '<img style="width:550px" src="'.$row['ico'].'" alt="" />';
        $ctime = $row['ctime'].' '.date_week($row['week']);
    }
}

function date_week($num){
        $num = (int)$num;
        switch($num){
            case $num==1:
                $week = '星期天';
                break;
            case $num==2:
                $week = '星期一';
                break;
            case $num==3:
                $week = '星期二';
                break;
            case $num==4:
                $week = '星期三';
                break;
            case $num==5:
                $week = '星期四';
                break;
            case $num==6:
                $week = '星期五';
                break;
            case $num==7:
                $week = '星期六';
                break;
            default:
                $week = '';

        }
        return $week;
}


?>

<script>
//    $.ajax({
//        url: './room/api/course',
//        type: 'get',
//        cache: false,
//        dataType: "jsonp",
//        jsonp:"callback",
//        success: function(json) {
//            var chat_qq_html ='';
//            var ad_pic_html ='';
//            $.each(json.qq,function(index, value){
//                chat_qq_html += '<img style="max-width:550px" border="0" src="skins/qqxiaoyou/button_11.gif" alt="'+value+'" title="请加QQ：'+value+'"> </a>';
//            });
//
//            layer_html += '</ul>';
//            $('.alertad').prepend(layer_html);
//            $('.ad_pic').html(ad_pic_html);
//            $('#qqbts').html(chat_qq_html);
//        }
//    });
</script>

<div class="kc-box">
<!--  <h2 class="kc-time" id='showtime'>--><?php //echo $ctime?><!--</h2>-->
  <i class='kc-close'></i>
  <div class="ke-pic">
      <?php echo $str?>
  </div>
</div>

<style type="text/css">
    /* CSS Document */
    .calllist {  font: normal 11px auto "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; color: #4f6b72;background-color: #c2ddf3; }
    .calllist a { color: #FFF; text-decoration: none;}
    .list { float: left; }
    .li { float: left; margin: 5px 5px 0 0; width: 112px; padding: 5px; border: 1px solid #aec5d8; background-color: #fff; height:208px;}
    .li_img img{ width: 108px; height: 150px; border: 1px #CCCCCC solid; padding: 1px; }
    .li_qq { background: url(img/pop_btn1.png) no-repeat; display: block; margin: 0 auto; color: #fff; font-size: 14px; padding-left: 25px; margin-top: 3px; width: 80px; height: 26px; line-height: 26px; overflow:hidden }
    .li_qq:hover{opacity: 0.9;}
    .li_phone { background: url(img/pop_btn2.png) no-repeat 1px 3px; display: block; height: 22px; line-height: 22px; padding-left: 12px; margin: 0 auto; overflow:hidden; color:#F00;}

    /*课程表弹窗*/
    .kc-box{
        display: none;
        width: 554px;
        height: auto;
        position: fixed;
        top: 50%;
        left: 50%;
        margin-left: -277px;
        margin-top: -184.5px;
        z-index: 99;
        background-color: #7a0200;
    }
    .kc-box .kc-time{
      font-size: 18px;
      font-weight: bold;
      color: #fae22c;
      height: 32px;
      line-height: 32px;
      text-align: center;
      position: relative;
    }
    .kc-box .kc-close{
      width: 23px;
      height: 22px;
      position: absolute;
      right: 4px;
      top: 5px;
      background: url(skins/qqxiaoyou/aa_03.png) no-repeat;
      cursor: pointer;
    }
    .kc-box .ke-pic{
      padding: 2px;
    }
</style>



</body>
</html>
<script>OnInit();</script>
<div style="display:none">
  <?=tohtml($cfg['config']['tongji'])?>
</div>
<!--[if IE 6]>
	<script type='text/javascript' src='script/png.js'></script>
	<script type='text/javascript'>
	  DD_belatedPNG.fix('.bg_png,.bg_png1,.bg_png2');
	</script>
<![endif]-->
<script charset="utf-8" src="http://wpa.b.qq.com/cgi/wpa.php"></script>
<script type="text/javascript">
    //点击在线客服触发


</script>
<!--<a href="javascript:void(0);" id="BizQQWPA800157676" qq="800157676"></a>-->

<script>
    //课程表弹窗
    function showTime(){ 
      var show_day=new Array('星期一','星期二','星期三','星期四','星期五','星期六','星期日'); 
      var time=new Date(); 
      var year=time.getFullYear(); 
      var month=time.getMonth(); 
      var date=time.getDate(); 
      var day=time.getDay(); 
      var hour=time.getHours(); 
      var minutes=time.getMinutes(); 
      var second=time.getSeconds(); 
      month<10?month='0'+month:month; 
      month=month+1; 
      hour<10?hour='0'+hour:hour; 
      minutes<10?minutes='0'+minutes:minutes; 
      second<10?second='0'+second:second; 
      var now_time=+year+'.'+month+'.'+date+' '+show_day[day-1]; 
      document.getElementById('showtime').innerHTML=now_time; 
  } 
//  setTimeout("showTime()");
    $(document).on('click','#kecheng .appico span',function(){
      $('.kc-box').fadeIn(500);
    });
    $(document).on('click','.kc-box .kc-close',function(){
      $('.kc-box').fadeOut(500);
    });


    // 判断是否登录弹窗
    $(document).on('click','.login_tip .lg_lt_btn',function(){
        $(".login_tip").fadeOut(500);
        openWin(2,false,'minilogin.php',390,310);
    })


    //勤牛盘口杀
    var bdisc_h = $('.bdisc-box').height()/2;
    $('.bdisc-box').css({"margin-top":-(bdisc_h+30)});
    $('.bdisc-box .isc_colse').mouseenter(function(event) {
        $(this).addClass('move');
    });
    $('.bdisc-box .isc_colse').mouseleave(function(event) {
        $(this).removeClass('move');
    });
    $(document).on("click",'.bdisc-box .isc_colse',function(){
        $('.bdisc-box').fadeOut(500);
    });
    $(document).on("click",'.bdisc',function(){
        $('.bdisc-box').fadeIn(500);
    });

    // 聊天窗口滚动
    var ms_h = $('#MsgBox1').height();

    // alert(ms_h)
    $('#MsgBox1').scrollTop(ms_h);

    $(function(){
        // 弹窗qq和在线客服qq
        $.ajax({
            url: 'http://actapi.gdgccj.com/html/app/gcjmnxqbII/common/get_qq.php?total=9',
            type: 'get',
            cache: false,
            dataType: "jsonp",
            jsonp:"callback",
            success: function(json) {
                var layer_html = '<ul>';
                var chat_qq_html ='';
                var ad_pic_html ='';
                $.each(json.qq,function(index, value){
                    layer_html+='<li><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin='+value+'&site=qq&menu=yes"><img border="0" src="skins/qqxiaoyou/button_11.gif" alt="'+value+'" title="请加QQ：'+value+'"></a></li>';
                    ad_pic_html+='<li><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin='+value+'&site=qq&menu=yes"><img border="0" src="skins/qqxiaoyou/button_11.gif" alt="'+value+'" title="请加QQ：'+value+'"></a></li>';
                    chat_qq_html += '<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin='+value+'&amp;site=qq&amp;menu=yes">';
                    chat_qq_html += '<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin='+value+'&amp;site=qq&amp;menu=yes">';
                    chat_qq_html += '<img border="0" src="skins/qqxiaoyou/button_11.gif" alt="'+value+'" title="请加QQ：'+value+'"> </a>';
                });

                layer_html += '</ul>';
                $('.alertad').prepend(layer_html);
                $('.ad_pic').html(ad_pic_html);
                $('#qqbts').html(chat_qq_html);
            }
        });

        //特供
        if($('.div03 .pic').is(":hidden")){
            get_cync();
            function get_cync(){
                var url = '<?=$csjurl?>/zhongduan/index.php?s=/index/jqdjson/get_tzckdtlist_live';
                $.ajax({
                    url: url,
                    type: 'POST',
                    cache: false,
                    dataType: "jsonp",
                    success: function(data) {
                        if (data) {
                            var html ='';
                            var rows = data;
                            for (var key in rows) {
                                html  += '<li><a target="_blank" href="<?=$csjurl?>/zhongduan/index.php/index/api/tzckdt?project=gc&id='+rows[key]['id']+'">'+rows[key]['title']+'-'+UnixToDate(rows[key].create_time,false,8) +'</a></li>';
                            }
                            $('#div03_list ul').html(html);
                        }else {
                            $('.sudi .id_inner ul').html('<li>努力更新中</li>');
                        }
                    }
                });
            }
        }

        //弹窗广告图片和链接
        alertAD();
        function alertAD(){
            var url = '<?=$csjurl?>/api/api.php/member/get_activities';
            var datas = {
                user_id:'',
                version:'1.0.1',
                type:5,
                total:5
            };

            $.ajax({
                url: url,
                type: 'POST',
                data: datas,
                cache: false,
                dataType: "jsonp",
                success: function (data) {
                    if (data.StringValue.length) {
                        var html ='';
                        var rows = data.StringValue;
                        var titleurl = rows[0].titleurl;
                        if(titleurl.indexOf("http") >= 0 )
                        {

                            html  += '<a target="_blank" href="'+rows[0].titleurl+'"><img style="width:800px;height:350px" src="'+rows[0].titlepic+'" alt="" /></a>';
                        }else {
                            html  += '<img style="width:800px;height:350px" src="'+rows[0].titlepic+'" alt="" />';
                        }

                        $('.alertad').prepend(html);
                    }
                }
            })
        }
    })

    // function web_join(tel){
    //     var data = {
    //         position: 1,
    //         a_id: 128,
    //         phone: tel,
    //         login_id: '',
    //         data: {
    //             username: '',
    //             phone: tel,
    //             login_id: '',
    //             stock: '',
    //             type:''
    //         },
    //         success_msg: '',
    //         error_msg: ''
    //     };
    //     $.ajax({
    //         url: '<?=$acturl?>/index/activity/web_join?'+ + encodeURI(location.search.substring(1)),
    //         type: 'POST',
    //         data: data,
    //         cache: false,
    //         dataType: "jsonp",
    //         success: function(data) {
    //             $('.popup .tchuang').fadeOut(300);
    //             $('.popup .tc-suc').fadeIn(300);
    //         }
    //     });
    // }





        //活动图片
        ad();
        function ad(){
            var url = '<?=$csjurl?>/api/api.php/member/get_activities';
            var datas = {
                user_id:'',
                version:'1.0.1',
                type:4,
                total:5
            };

            $.ajax({
                url: url,
                type: 'POST',
                data: datas,
                cache: false,
                dataType: "jsonp",
                success: function(data) {
                    if (data.StringValue) {
                        var html ='';
                        var rows = data.StringValue;
                        for (var key in rows) {
//                            html  += '<li class=""> <a id="'+rows[key]['id']+'" target="_blank" href="'+rows[key]['titleurl']+'"><img src="'+rows[key]['titlepic']+'" alt="" /></a> </li>';
                            html  += '<li class=""> <a id="'+rows[key]['id']+'" target="_blank" onclick="firstWin()" href="javascript:void(0)"><img src="'+rows[key]['titlepic']+'" alt="" /></a> </li>';
                        }

                        $('#banner ul').html(html);
                        $('#NoticeList .slideTxtBox .bd>div').niceScroll({cursorcolor: "#FFF", cursorwidth: "2px", cursorborder: "0px;"});
                        // 右下角盒子的响应
                        var noth_s = $('.NoticeList .slideTxtBox .hd').height();
                        var li_s = 320;
                        var noth = $('#NoticeList').height()-noth_s;
                        $('#NoticeList .slideTxtBox .bd>div').css('overflowY','auto');
                        $('#NoticeList .slideTxtBox .bd').css('height',noth);
                        $('#NoticeList .slideTxtBox .bd .banner ul').css('height',li_s);

                        // 轮播js
                        var sx = 0;
                        var imgLength=$(".NoticeList .slideTxtBox .bd .banner li").length;
                        $('#NoticeList #b-prev').click(function(event) {
                            sx--;
                            if(sx<0){ sx=imgLength-1 };
                           $('.banner ul li').eq(sx).stop().fadeIn(1).siblings().stop().fadeOut(1);
                        });
                        $('#NoticeList #b-next').click(function(event) {
                            sx++;
                            if(sx>imgLength-1){ sx=0 };
                            $('.banner ul li').eq(sx).stop().fadeIn(1).siblings().stop().fadeOut(1);
                        });

                        // 自动播放模块
                        function func(){            // 抽离出指令
                            sx++
                            if(sx>imgLength-1){ sx=0 }      // 虚拟索引值，取值 0~5，如果大于5，变成0
                            $('.banner ul li').eq(sx).stop().fadeIn(1000).siblings().stop().fadeOut(1000);
                        }
                        timer = setInterval(func, 2000 )   

                        // 清除定时器
                        $('#NoticeList .banner').hover(function() {
                            clearInterval(timer)
                        }, function() {
                            clearInterval(timer)
                            timer = setInterval(func, 2000 )
                        });
                        // 清除定时器
                        $('#NoticeList #b-prev').hover(function() {
                            clearInterval(timer)
                        }, function() {
                            clearInterval(timer)
                            timer = setInterval(func, 2000 )
                        });
                        $('#NoticeList #b-next').hover(function() {
                            clearInterval(timer)
                        }, function() {
                            clearInterval(timer)
                            timer = setInterval(func, 2000 )
                        });
                    }else {
                        $('.sudi .id_inner ul').html('<li>努力更新中</li>');
                    }
                }
            });
        window.onload= function(){
            var pic_height = $('.NoticeList .slideTxtBox .bd div.div01').height();
            var O_h = $('.NoticeList .slideTxtBox .div01 .banner li').eq(0).children('a').children('img').height();
            $('#NoticeList .slideTxtBox .bd .banner ul').css('height',pic_height);
            $('#NoticeList .slideTxtBox .bd .banner ul li').css('height',pic_height);
            $('.NoticeList .slideTxtBox .div01 .banner #b-next,.NoticeList .slideTxtBox .div01 .banner #b-prev').css('display','block');
        };

        // 弹窗
        $(document).on('click','.popup .tc-close',function(){
            $('.popup').fadeOut(300);
        });
        $(document).on('click','.popup .tc-suc h2 i',function(){
            $('.popup').fadeOut(300);
        });
        $(document).on('click','.popup .suc-btn',function(){
            $('.popup').fadeOut(300);
        });

        $(document).on('click','.NoticeList .slideTxtBox .div03 #div03_vip',function(){
           $('.popup').fadeIn(300);
            // openWin(2,'特供参考','http://www.baidu.com',620,400)
        });
        // banner的图片
    };
</script>

